#!/usr/bin/env python

import logging
import logging.config

# Set up the logger - if we don't read the config before loading the
# other modules, the logging doesn't

logging.config.fileConfig('getItemConsumables.config')
logger = logging.getLogger('allConverging.getItemConsumables')


import sys
import allconsuming.webdac
import pprint

def main(args=None):
    if args == None:
        args = sys.argv[1:]

        for itemNumber in args:
            consumables = allconsuming.webdac.getItemConsumables(itemNumber)
            pprint.pprint(consumables)
            print len(consumables)
    return 0


if __name__ == '__main__':
    sys.exit(main())

